<!doctype html>
<html>
<head>
    <title>易安友|注册</title>
    <include file="public:headtop"/>
    <link href="//7xk20n.com1.z0.glb.clouddn.com/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="/static/css/register.css" rel="stylesheet">
</head>

<body>
<div class="logo-box">
    <img src="/static/images/logo02.png" alt="logo" class="img-responsive">
</div>

<div class="container">
    <form action="" method="post">
        <input type="hidden" name='openid' value="{$openid}">
        <h4 class="content-title">必填项目</h4>
        <div class="content-block">
            <div class="form-group">
                <label class="control-label">*</label>
                <input class="form-control" type="text" name="username" required placeholder="登录账号"/>
            </div>
            <div class="form-group">
                <label class="control-label">*</label>
                <input class="form-control" type="password" name="password" required="" id="password" placeholder="密码"/>
            </div>
            <div class="form-group">
                <label class="control-label">*</label>
                <input class="form-control" type="password" name="password1" required="" placeholder="确认密码"/>
            </div>
        </div>
       <!--  <h4 class="content-title">选填项目</h4>
        <div class="content-block">
            <div class="form-group">
                <input class="form-control" type="text" name="yaoqing" placeholder="邀请码"/>
            </div>
        </div>
        <div class="form-group">
            <input class="form-control" type="text" name="truename" value="" placeholder="姓名"/>
        </div>
        <div class="form-group">
            <input class="form-control" type="text" name="idcard" value="" placeholder="身份证号">
        </div>
        <div class="form-group">
            <input class="form-control" type="text" name="idcardimg" value=""
                   readonly placeholder="点击上传身份证照片" id="idcardimg"/>
        </div>
        <div class="form-group">
            <input class="form-control" type="test" name="tel" value="" placeholder="电话号码">
        </div> -->
        <!-- <div class="form-group">
            <input class="form-control" type="test" id="bankaccount" name="bankaccount" value="" placeholder="银行卡账号">
        </div>
        <div class="form-group">
            <input class="form-control" type="test" name="bankname" id="bankname"
                   value="" placeholder="开户行">
        </div> -->
        <div class="form-group text-center">
            <button class="btn btn-default" type="submit">注&nbsp;&nbsp;册</button>
        </div>
    </form>
</div>


<script src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script src="/static/assets/form.js"></script>
<script src="//7xk20n.com1.z0.glb.clouddn.com/plugins/jquery-validation/js/jquery.validate.min.js"></script>
<script src="/static/assets/jquery.validate.zh-cn.js"></script>

<script>
    /*用于绑定移动端点击事件*/
    document.body.addEventListener('touchstart', function () {
    });

    (function() {
        var config = {debug: false};
        config.url = "{$js.url}";
        config.appId = '{$js.appId}';
        config.timestamp = '{$js.timestamp}';
        config.nonceStr = '{$js.nonceStr}';
        config.signature = '{$js.signature}';
        config.jsApiList = ['chooseImage', 'uploadImage'];
        wx.config(config);
    })();

    $(function () {
        var $form = $('form');
        $('#idcardimg').WxUpload(function(serverId) {
            $('#idcardimg').val(serverId);
        });

        var $bn = $('#bankname');

        $('#bankaccount').on('change', function() {
            if(! $(this).valid()) return;

            $.getJSON("{:U('Index/bankArea')}&account=" + this.value, function(data) {
                if(data.status == 200) {
                    $bn.val(data.data);
                }
            });
        });

        Form.register($form );
    });
</script>
</body>
</html>